﻿using System; 
using System.Text;
using System.Collections.Generic; 
using System.Data;
using System.Data.SqlClient;
namespace Sasc.PV.DAL
{
	[Serializable]
	public partial class ERPDanWeiInfo
	{		
        
        #region Ctor
        public ERPDanWeiInfo()
        {
      	      	_id=(int)0;
      			_danweiname= "";
      			_tel= "";
      			_fax= "";
      			_youbian= "";
      			_address= "";
      			_weburl= "";
      			_email= "";
      			_kaihuhang= "";
      			_zhanghao= "";
       }
        #endregion

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public ERPDanWeiInfo GetModel()
        {

            StringBuilder strSql = new StringBuilder();
            strSql.Append("select ID, DanWeiName, Tel, Fax, YouBian, Address, WebUrl, Email, KaiHuHang, ZhangHao  ");
            strSql.Append("  from ERPDanWeiInfo ");



            ERPDanWeiInfo model = new ERPDanWeiInfo();
            using (SqlDataReader reader = DbHelperSQL.GetDataReader(strSql.ToString()))
            {

                if (reader!=null)
                {
                    while (reader.Read())
                    {
                        model.ID = Convert.ToInt32(reader["ID"]);

                        model.DanWeiName = reader["DanWeiName"].ToString();
                        model.Tel = reader["Tel"].ToString();
                        model.Fax = reader["Fax"].ToString();
                        model.YouBian = reader["YouBian"].ToString();

                        model.Address = reader["Address"].ToString();
                        model.WebUrl = reader["WebUrl"].ToString();
                        model.Email = reader["Email"].ToString();
                        model.KaiHuHang = reader["KaiHuHang"].ToString();
                        model.ZhangHao = reader["ZhangHao"].ToString();
                    }
                }
            
            
            }
                return model;
            
         
        }
	}
}